package mypack.remoteTest.impl;

import java.rmi.Naming;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;

import mypack.remoteTest.MyRemote;

public class MyRemoteImpl extends UnicastRemoteObject implements MyRemote{

	protected MyRemoteImpl() throws RemoteException {
	}

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Override
	public String sayHello() throws RemoteException {
        		
		return "SERVER SAY helly";
	}
	
	public static void main(String [] args){
		
		try{
         MyRemote servce  = new MyRemoteImpl();
         Naming.bind("RemoteHelo", servce);
		}catch(Exception e){
			e.printStackTrace();
		}
		
	}
	

}
